library Wave17b initializer init requires LegacySystem

    function Wave17b takes nothing returns nothing //Heavy Counterattack
        set udg_CurrentWave = 17
        call GenericActions.execute()
        call GeneralText(7.0, "|cffcd950cMarine|r : There's too many of them in Ravenholm. We're going to need to pick them off and thin their numbers before moving in." )
        call PolledWait(20.)
        call GankMarine(Player(9),'z008',GetRandomInt(1,udg_Spawn),2600,4000)
        call GankMarine(Player(9),'z009',GetRandomInt(1,udg_Spawn),2600,4000)
        call GankMarine(Player(9),'z008',2+GetRandomInt(1,udg_Spawn),2600,4000)
        call PolledWait(25.)
        if udg_SquadXP>65000 and GetRandomInt(0,3)==1 then
            call GankMarine(Player(9),'n00R',2+GetRandomInt(1,udg_Spawn),3500,4500) //Raven Mines
        endif
        call RandomSpawn2('z00C',2,GetRandomInt(0,1)) //Assasin
        call GankMarine(Player(9),'z008',GetRandomInt(1,udg_Spawn),2600,4000)
        call GankMarine(Player(9),'z009',GetRandomInt(1,udg_Spawn),2600,4000)
        call GankMarine(Player(9),'z008',2+GetRandomInt(1,udg_Spawn),2600,4000)
        call PolledWait(20.)
        if GetRandomInt(0,5)==1 and udg_InitialPlayers>3 and udg_SquadXP>95000 then
            call RandomSpawn2('h001',1,1) //Apache
        endif
        call GankMarine(Player(9),'z008',3+GetRandomInt(1,udg_Spawn),2600,4000)
        call GankMarine(Player(9),'z008',2+GetRandomInt(1,udg_Spawn),2600,4000)
        call GankMarine(Player(9),'z000',GetRandomInt(1,udg_Spawn),2600,4000) //Machine Gunner
        call PolledWait(70.*udg_Pace)
        if udg_Players>0 then
            call ExecuteRegisteredFunction("Wave18b")
            //call Wave18b.execute()
        endif
    endfunction

    private function init takes nothing returns nothing
        call RegisterFunction("Wave17b", function Wave17b)
    endfunction
    
endlibrary
